const puppeteer = require("puppeteer");
// puppeteer 官网案例：example 截图
(async () => {
  const browser = await puppeteer.launch(); // 默认为true 开启无头模式
  //   const browser = await puppeteer.launch({ headless: false }); // 默认为true 开启无头模式
  const page = await browser.newPage();
  await page.goto("https://example.com");
  await page.screenshot({ path: "example.png" });
  await browser.close();
})();
